﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static App.Common.Data;

public class hexagon : MonoBehaviour
{
    /*
    东北:(1,0,-1)
    东:(1,-1,0)
    东南：（0，-1,1）
    西北：（0,1，-1）
    西：（-1,1,0）
    西南：（-1,0,1）

    


    */
    public bool IsConnected = false;
    public List<Edge> edges;
    public Vector3 Pos;
    private LineRenderer LineRenderer;



    void Start()
    {
        LineRenderer = GetComponent<LineRenderer>();
    }
    
    public void ClockWise()//尾移首
    {
        Edge temp = edges[edges.Count-1];
        for(int i= edges.Count - 1; i > 0; i--)
        {
            edges[i] = edges[i - 1];
        }
        edges[0] = temp;

        
    }

    public void AntiClockWise()//首移尾
    {
        Edge temp = edges[0];
        for(int i = 0; i < edges.Count-1; i++)
        {
            edges[i] = edges[i + 1];
        }
        edges[edges.Count - 1] = temp;
       
    }
    public void ChangeTheEdgeInfo(string s)
    {
        if (s == "Start")
        {
            for(int i = 0; i < 6; i++)
            {
                edges[i] = Edge.Out;
            }
        }
        else if(s=="End")
        {
            for (int i = 0; i < 6; i++)
            {
                edges[i] = Edge.In;
            }
        }
    }

}
